package com.yilin.tms.core.commons.model;

import com.yilin.tms.core.commons.base.BaseAuth;

import java.io.Serializable;

public class AuthStatusData implements Serializable {

    private AuthData.AuthItem authItem;
    private AuthStatus authStatus;

    public AuthStatusData(AuthData.AuthItem authItem, AuthStatus authStatus) {
        if (authStatus == null) authStatus = AuthStatus.notApply;
        this.authItem = authItem;
        this.authStatus = authStatus;
    }

    public AuthStatusData() {
    }

    public AuthStatusData(AuthStatus authStatus) {
        this.authStatus = authStatus;
    }

    public AuthStatusData(AuthData.AuthItem authItem) {
        this.authItem = authItem;
    }

    public AuthStatusData(AuthData.AuthItem authItem, BaseAuth baseAuth) {
        this.authItem = authItem;
        if (baseAuth != null) {
            this.authStatus = baseAuth.getAuthStatus();
        } else {
            this.authStatus = AuthStatus.notApply;
        }
    }

    public AuthData.AuthItem getAuthItem() {
        return authItem;
    }

    public void setAuthItem(AuthData.AuthItem authItem) {
        this.authItem = authItem;
    }

    public AuthStatus getAuthStatus() {
        return authStatus;
    }

    public void setAuthStatus(AuthStatus authStatus) {
        this.authStatus = authStatus;
    }
}

